<h2>User Management</h2>
<hr/>
<p>The User Management function is used to View, Add, Modify or Delete users of the Internal (Intranet) Caroline Chisholm Library System.</p> 
<center>

<table>
<tr>
	<th>Username</th>
	<th>Staff Access</th>
	<th>Admin Access</th>
	<th>Super User Access</th>
	<th class="tablehead">Actions</th>
</tr>
<?php
foreach ($users->result() as $user)
{
	echo '<tr>';
	
	// Details
	echo '<td>' . $user->username . '</td>';
	echo '<td>'; if ($user->staff_access) echo 'Yes'; else echo 'No'; echo '</td>';
	echo '<td>'; if ($user->admin_access) echo 'Yes'; else echo 'No'; echo '</td>';
	echo '<td>'; if ($user->su_access) echo 'Yes'; else echo 'No'; echo '</td>';
	
	// Actions
	echo '<td>';
	echo anchor('admin/user_management/modify/' . $user->username, 'Modify') . '/';
	echo anchor('admin/user_management/delete/' . $user->username, 'Delete', array('onclick'=>"return confirm('Are you sure you wish to remove this user?');"));
	echo '</br></td>';
	echo '</tr>';
}
?>
</table>
<br />
<table>
<tr>
	<td align="center"><?php echo anchor('admin/user_management/add/', 'Add A New User'); ?></td>
</tr>
</table>
</center>
